package com.xmsx.back.pojo;

import java.util.Objects;

public class ElementTotal {

    private String term;
    private int total;
    private int bachelorNum;
    private int masterNum;

    public ElementTotal() {
    }

    public ElementTotal(String term, int total, int bachelorNum, int masterNum) {
        this.term = term;
        this.total = total;
        this.bachelorNum = bachelorNum;
        this.masterNum = masterNum;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getBachelorNum() {
        return bachelorNum;
    }

    public void setBachelorNum(int bachelorNum) {
        this.bachelorNum = bachelorNum;
    }

    public int getMasterNum() {
        return masterNum;
    }

    public void setMasterNum(int masterNum) {
        this.masterNum = masterNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ElementTotal)) return false;
        ElementTotal that = (ElementTotal) o;
        return getTotal() == that.getTotal() &&
                getBachelorNum() == that.getBachelorNum() &&
                getMasterNum() == that.getMasterNum() &&
                Objects.equals(getTerm(), that.getTerm());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getTerm(), getTotal(), getBachelorNum(), getMasterNum());
    }

    @Override
    public String toString() {
        return "ElementTotal{" +
                "term='" + term + '\'' +
                ", total=" + total +
                ", bachelorNum=" + bachelorNum +
                ", masterNum=" + masterNum +
                '}';
    }
}
